﻿package scenes
{
   import casts.*;
   
   import jp.progression.casts.*;
   import jp.progression.commands.display.*;
   import jp.progression.scenes.*;
	
	/**
	 * @author  cjboy1984@gmail.com
	 */
	public class StepScene extends SceneObject
	{
      // label
      private var targetLabel:String;

      // flag
      private var _isTween:Boolean;

		public function StepScene(name:String, labelName:String, isTween:Boolean = true, initObject:Object = null)
		{
			super(name, initObject);

         // label
         targetLabel = labelName;

         // flag
         _isTween = isTween;
		}

		// ################### protected ##################

		override protected function atSceneInit():void
		{
         // tracking
         MyUtils.extCall('pv', 1);

         if (_isTween)
         {
            MyUtils.sendEvent(new MyEvent(MyEvent.STEP_SCENE_GOTO, targetLabel));
         }
         else
         {
            MyUtils.sendEvent(new MyEvent(MyEvent.STEP_SCENE_GOTO_IMMEDIATELY, targetLabel));
         }
		}

		override protected function atSceneGoto():void {}
      override protected function atSceneLoad():void {}
		override protected function atSceneUnload():void {}
      override protected function atSceneAscend():void {}
      override protected function atSceneDescend():void {}

      // #################### private ###################

      // --------------------- LINE ---------------------

	}

}
